<%@ page contentType="text/html; charset=UTF-8" errorPage="/base/jsp/common/CommonError.jsp"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="h" uri="/bdp-html" %>
<%@taglib prefix="bdp" uri="/bdp-base" %>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<html>
<head>
<%@ include file="/base/jsp/common/CommonEditTop.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>工作管理-修改技术摘要</title>
<link href="${ctx}/base/css/base.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/base/css/common.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/base/css/${customTheme}.css" rel="stylesheet" type="text/css" />

<script src="${ctx}/base/js/jquery/jquery.js" type="text/javascript"></script>
<script src="${ctx}/base/js/jquery/jquery.metadata/jquery.metadata.js" type="text/javascript"></script><!--加载jquery扩展属性-->
<script src="${ctx}/base/js/jquery/jquery.validate/jquery.validate.js" type="text/javascript"></script><!-- 加载jquery-validate  -->
<script src="${ctx}/base/js/jquery/jquery.validate/localization/messages_cn.js" type="text/javascript"></script><!-- 加载jquery-validate语言  -->
<script src="${ctx}/base/js/base.js" type="text/javascript"></script>
<script src="${ctx}/base/js/validate/FormValidate.js" type="text/javascript"></script><!-- 加载通用验证  -->
<script type="text/javascript" src="${ctx}/base/js/common/FormFunction.js"></script><!-- 公用的按钮函数 -->
</head>
<body class="rightBody">
<form id="usersForm" name="usersForm" method="post" action="">
<s:hidden name="users.id" />
    <table class="location" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="icon"></td>
            <td>您现在所在的位置是：系统管理 &gt;&gt; 修改用户信息</td>
        </tr>
    </table>
	<div class="tableH2">修改用户信息</div>
    <table width="100%" class="list" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td class="tdBg" width="100"><span class="fRed">*</span>用户编号：</td>
			<td><s:hidden name="users.code" /><s:property value="users.code"/></td>
			<td class="tdBg" width="100"><span class="fRed">*</span>用户名称：</td>
			<td><s:textfield name="users.name" id="name" cssClass="input"/></td>
		</tr>
		<tr>
			<td class="tdBg"><span class="fRed">*</span>性别：</td>
			<td><select name="users.sex" id="sex" class="select"><option value="1" <c:if test="${users.sex==1}">selected</c:if>>男</option><option value="0" <c:if test="${users.sex==0}">selected</c:if>>女</option></select></td>
			<td class="tdBg"><span class="fRed">*</span>所在组：</td>
			<td><s:select name="users.organization.id" list="organizationList" listKey="id" listValue="name"/></td>
		</tr>
		<tr>
			<td class="tdBg" width="100"><span class="fRed">*</span>联系电话：</td>
			<td colspan="3"><s:textfield name="users.homeTel" id="code" cssClass="input"/></td>
		</tr>
	</table>
    <div class="tc mt10">
    	<bdp:permission module="users" operation="save">
			<input type="button" onClick="defaultEvent('save')" id="save" value="保存" class="btnB2" /> 
		</bdp:permission>
		&nbsp;&nbsp;<input type="button" name="Submit4" class="btnB2" value="返回" onClick="defaultEvent('exit')">
	</div>
</form>
<script>
var saveUrl = "${ctx}/sys/users!modUsers.action";//表单列表save的url地址
var listUrl = "${ctx}/sys/users!listUsers.action";//表单列表list 的url地址,用来作为搜索地址

function defaultEvent(eventType) {
	if(eventType=='save') {
		var flg = FormValidate.validate("#usersForm",{
		    rules: {
			    "users.name": {
				    required: true
			    }
		    },
		    messages: {
			    "users.name": {
				    required: "用户名称不能为空！"
			    }
		    }
		});
			
		if(!flg) {
			return false;
		}
	}
	FormFunction.defaultEvent(eventType);
}
</script>
<%@ include file="/base/jsp/common/CommonEditFoot.jsp"%>
</body>
</html>
